The present invention relates to an improved compiler for computer source code, and more specifically, to replacing potentially inefficient sequence of indirect array accesses in computer source code.
Memory operations, including loads from memory and stores to memory, are generally time consuming and inefficient during execution of a computer program. Reducing the number of memory operations during execution of a computer program can improve the efficiency and speed of the computer program. Compilers can optimize the number of memory operations during execution of a program by combining multiple loads or stores into a single load or store. This can be done, for example, by replacing the original inefficient code portions in the source code with more efficient replacement code.